﻿using System;


namespace TopBuilds.Restaurant.Data
{
    public class Member
    {
        #region 属性
        private int _id;
        private string _name;
        private int _sex;
        private string _password;
        private int _discountOptionId;
        private int _consumption;
        private string _mobile;
        private string _phone;
        private string _company;
        private string _address;
        private int _state;
        private int _consumeCount;
        private DateTime _regDate;
        private DateTime _lastConsumeDate;
        #endregion

        #region 构造
        public Member()
        {
            _id                 = 0;
            _name               = null;
            _sex                = 0;
            _password           = null;
            _discountOptionId   = 0;
            _consumption        = 0;
            _mobile             = null;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id)
        {
            _id                 = id;
            _name               = null;
            _sex                = 0;
            _password           = null;
            _discountOptionId   = 0;
            _consumption        = 0;
            _mobile             = null;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name)
        {
            _id                 = id;
            _name               = name;
            _sex                = 0;
            _password           = null;
            _discountOptionId   = 0;
            _consumption        = 0;
            _mobile             = null;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = null;
            _discountOptionId   = 0;
            _consumption        = 0;
            _mobile             = null;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId   = 0;
            _consumption        = 0;
            _mobile             = null;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId   = discountId;
            _consumption        = 0;
            _mobile             = null;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId   = discountId;
            _consumption        = consumption;
            _mobile             = null;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId   = discountId;
            _consumption        = consumption;
            _mobile             = mobile;
            _phone              = null;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile, string phone)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId   = discountId;
            _consumption        = consumption;
            _mobile             = mobile;
            _phone              = phone;
            _company            = null;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile, string phone, string company)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId   = discountId;
            _consumption        = consumption;
            _mobile             = mobile;
            _phone              = phone;
            _company            = company;
            _address            = null;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile, string phone, string company, string address)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId   = discountId;
            _consumption        = consumption;
            _mobile             = mobile;
            _phone              = phone;
            _company            = company;
            _address            = address;
            _state              = 0;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile, string phone, string company, string address, int state)
        {
            _id                 = id;
            _name               = name;
            _sex                = sex;
            _password           = password;
            _discountOptionId  = discountId;
            _consumption        = consumption;
            _mobile             = mobile;
            _phone              = phone;
            _company            = company;
            _address            = address;
            _state              = state;
            _consumeCount       = 0;
            _regDate            = DateTime.Now;
            _lastConsumeDate    = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile, string phone, string company, string address, int state, int consumeCount)
        {
            _id                = id;
            _name              = name;
            _sex               = sex;
            _password          = password;
            _discountOptionId  = discountId;
            _consumption       = consumption;
            _mobile            = mobile;
            _phone             = phone;
            _company           = company;
            _address           = address;
            _state             = state;
            _consumeCount      = consumeCount;
            _regDate           = DateTime.Now;
            _lastConsumeDate   = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile, string phone, string company, string address, int state, int consumeCount, DateTime regDate)
        {
            _id                = id;
            _name              = name;
            _sex               = sex;
            _password          = password;
            _discountOptionId = discountId;
            _consumption       = consumption;
            _mobile            = mobile;
            _phone             = phone;
            _company           = company;
            _address           = address;
            _state             = state;
            _consumeCount      = consumeCount;
            _regDate           = regDate;
            _lastConsumeDate   = DateTime.Now;
        }

        public Member(int id, string name, int sex, string password, int discountId, int consumption, string mobile, string phone, string company, string address, int state, int consumeCount, DateTime regDate, DateTime lastConsumeDate)
        {
            _id               = id;
            _name             = name;
            _sex              = sex;
            _password         = password;
            _discountOptionId = discountId;
            _consumption      = consumption;
            _mobile           = mobile;
            _phone            = phone;
            _company          = company;
            _address          = address;
            _state            = state;
            _consumeCount     = consumeCount;
            _regDate          = regDate;
            _lastConsumeDate  = lastConsumeDate;
        }
        #endregion

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public int Sex
        {
            get { return _sex; }
            set { _sex = value; }
        }

        public string Password
        {
            get { return _password; }
            set { _password = value; }
        }

        public int DiscountOptionId
        {
            get { return _discountOptionId; }
            set { _discountOptionId = value; }
        }

        public int Consumption
        {
            get { return _consumption; }
            set { _consumption = value; }
        }

        public string Mobile
        {
            get { return _mobile; }
            set { _mobile = value; }
        }

        public string Phone
        {
            get { return _phone; }
            set { _phone = value; }
        }

        public string  Company
        {
            get { return _company; }
            set { _company = value; }
        }

        public string Address
        {
            get { return _address; }
            set { _address = value; }
        }

        public int State
        {
            get { return _state; }
            set { _state = value; }
        }

        public int ConsumeCount
        {
            get { return _consumeCount; }
            set { _consumeCount = value; }
        }

        public DateTime RegDate
        {
            get { return _regDate; }
            set { _regDate = value; }
        }

        public DateTime LastConsumeDate
        {
            get { return _lastConsumeDate; }
            set { _lastConsumeDate = value; }
        }
        public override string ToString()
        {
            return Name;
        }
    }
}
